﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template.Master" AutoEventWireup="true" CodeBehind="MinorAdd.aspx.cs" Inherits="SystemDirectory.Pages.Forms.MinorAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
.top {
	border: 0px solid #ccc;
	overflow: hidden;
	padding: 0;
	margin: 0;
	padding-bottom: 2px; 
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
}
.top-left {
	border: 0px solid #ccc;
	font:bold 14px Arial,  Verdana, Helvetica, sans-serif;
	float: left;
	padding: 5px 0;
}
.top-right {
	border: 0px solid #ccc;
	float: right;
	text-align: right;
}
.details1 {
	overflow: hidden;
}
.content-left {
	float: left;
	padding-right: 20px;
	border: 0px solid #ccc;
}
.content-right {
	float: right;
	border: 0px solid #ccc;
}
.frm .field {
	display: table;
	margin: 5px;
}
.frm div label {
	width: 150px;
	word-wrap: break-word;
	display: table-cell;
    vertical-align: middle;
    position: static;
}
.frm textarea {
	width: 200px;
	height: 80px;
}
.frm input[type="text"], input[type="password"] {
	width: 200px;
}
.lstcbb {
	width:210px;
	height:95px;
	overflow-y:auto;
	border:1px solid #ccc;
	background-color: #fff;
	display:auto;
}
.box {
    margin: 0 0 10px 0;
    padding: 10px 15px 5px;
    background-color: white;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    box-shadow: 0 0 3px #AAA;
    -moz-box-shadow: 0 0 3px #AAA;
    -webkit-box-shadow: 0 0 3px #AAA;
}
div.box h1 {
    font-weight: 600;
	font-size: 18px;
	line-height: 1.2em;
	border-bottom: 1px dotted #333;
	margin-bottom: 1em;
	color: green;
}
div.box h1 {
    border-bottom: 0px dotted #333;
	margin-bottom: 1em;
	color: green;
}
div.box h3 {
    font-size: 17px;
    margin: 0 0 5px;
}
div.box h4 {
    font-size: 14px;
}

div.box h4 a{
	padding: 0;
	margin: 0;
}
.tabContents{
	background-color: #eee;
	border: 1px solid #ccc;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	margin: 5px;
	min-height: 450px;
	padding:10px;
	padding-top: 15px;
	}
	
	.tabDetails{
	background:#fff;
	border:1px solid #ccc;
	margin:45px 0 0;
}
#tabContaier{
	margin:0;
	padding:0;
	position:relative;}
	
#tabContaier ul{
	overflow:hidden;
	position:absolute;
	top: -25px;
	padding: 0 2px;
	}

#tabContaier .btn{
	overflow:hidden;
	position:absolute;
	top: -36px;
	right: 0px;
	z-index:100;
	float: right;
        height: 28px;
    }

#tabContaier .btn input{
	margin: 0 5px;
}
	
#tabContaier li{
	float:left;
	list-style:none;
	}

#tabContaier li a{
	background:#ddd;
	border:1px solid #ccc;
	color:#333;
	cursor:pointer;
	display:block;
	height:25px;
	font-weight:700;
	line-height:25px;
	padding:0 10px;
	text-decoration:none;
	-webkit-border-top-left-radius: 5px;
	-webkit-border-top-right-radius: 5px;
	-moz-border-radius-topleft: 5px;
	-moz-border-radius-topright: 5px;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	}
	
#tabContaier li a:hover{
	background:#ccc;}
	
#tabContaier li a.active{
	background:#fff;
	border:1px solid #ccc;
	color:#333;
	border-bottom: 0;
	}
</style>
    <link href="/Resource/Css/jquery-ui-1.10.1.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Resource/Css/jquery-ui-1.10.1.custom.js" ></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#ContentPlaceHolder1_receiveDate").datepicker();
            $("#ContentPlaceHolder1_authorisedDate").datepicker();
            $("#ContentPlaceHolder1_anticipatedCompletion").datepicker();
            $("#ContentPlaceHolder1_completionDate").datepicker();
        })
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#modalLookup').modal('show');
            $('#ContentPlaceHolder1_manager_name').attr("readonly", "readonly");

            $('#btnNone').click(function () {
                $('#modalLookup').modal('hide');
            })
            $('#btnClose').click(function () {
                $('#modalLookup').modal('hide');
            })
        });

        function btnModalClick() {
            $('#modalLookup').modal('show');
        }

        function btnSelect_click() {
            $('#modalLookup').modal('hide');
            $('#ContentPlaceHolder1_manager_name').val($('#select:checked').val());
        }
    </script>
        <script type="text/javascript">
    $(document).ready(function () {
        $("#ContentPlaceHolder1_txtId").hide();
    })
    function fillId() {
        $("#ContentPlaceHolder1_txtId").val($('#select:checked').val());
         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="box">
            <h3><a >Project/Minor Works</a></h3>
            <div id="tabContaier">
            
				<ul style="float:left;margin-left:0px">
					<li style="float:left"><a class="active" href="#tab1">Project/Minor Works</a></li>					 
				</ul>                
                <div class="field">
					<!--<input type="button" value="Search Contact" class="btn btn-primary" style="margin-right:10px" />-->                     				 
					<asp:Button ID="saveMinor" runat="server" Text="Save" 
                        CssClass="btn btn-primary" Style="margin-right:70px" onclick="saveMinor_Click"/>
                    
					<a href="/Pages/Forms/PremiseAdd.aspx"><input type="button" class="btn btn-primary"  value="Back" /></a>
				</div>
                <div class="tabDetails">
                <div id="tab3" class="tabContents"  style="height: 450px">                       
                        
						<div class="content-left frm">

							<div class="field">
								<label for="org_desshort">P/MW Description<span style="color:Red;">*</span></label>
                                <asp:TextBox ID="description" runat="server" TextMode="MultiLine"></asp:TextBox>
                                <br />                               
							    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ForeColor="Red" ControlToValidate="description" ValidationGroup="vgroup">Not Empty Description</asp:RequiredFieldValidator>
                                                               
							</div>
                            <div class="field">
                            <label class="radio">
                                <asp:RadioButton ID="RadioButton1" runat="server" value="option1" Checked GroupName="abc"/>                            
                             Project
                            </label>
                            <label class="radio">
                            <asp:RadioButton ID="RadioButton2" runat="server" value="option2" GroupName="abc"/>                              
                            Minor Works
                            </label></div>
                                                        						                     
							<div class="field">
								<label for="org_postcode">Is TBA? </label>
								<asp:CheckBox ID="isTBA" name="isTBA" runat="server" />							 
							</div>

                           <div class="field">
								<label for="org_postcode">Notes Actions </label>
								<asp:TextBox ID="notesAction" runat="server" TextMode="MultiLine"></asp:TextBox>
							 
							</div>

                            <div class="field">
								<label for="org_postcode">Estimated Cost</label>								 
							    <asp:TextBox ID="estimatedCode" runat="server"></asp:TextBox>
							</div>
                            <div class="field">
								<label for="org_postcode">Actual Cost</label>								
                                <asp:TextBox ID="actualCost" runat="server"></asp:TextBox>
                                
							</div>        
                                              
                           <div class="field">
								<label for="org_pre">Directorate</label>
                               <asp:DropDownList ID="directorate" runat="server">
                                   <asp:ListItem Enabled="False">Directorate1</asp:ListItem>
                                   <asp:ListItem>Directorate2</asp:ListItem>
                                   <asp:ListItem>Directorate3</asp:ListItem>
                                   <asp:ListItem>Directorate4</asp:ListItem>
                                   <asp:ListItem>Directorate4</asp:ListItem>
                               </asp:DropDownList>
                                
							</div class="field">                           

						</div>
						<div class="content-right frm">
							 <div class="field">
								<label for="ds">Contact</label>
                                <%--- <input type="text" name="leadcontact" value="" id="org_leadcontact" disabled style="width: 150px;" />
								<a href="#">Lookup</a>--%>
                                <asp:TextBox ID="manager_name"  runat="server" Width=150px  Enabled=false ></asp:TextBox>
							<%--<a id="testAnchor" role="button" data-toggle="modal" href="#" style="margin-left:10px" onclick="btnModalClick()" >Lookup</a>--%>
                            <asp:LinkButton ID="lbnModal" runat="server" onclick="lbnModal_Click">Lookup</asp:LinkButton>							 
							</div>
                             
                            <div class="field">
								<label for="org_pre">Authorised by Name</label>                                 
                                <asp:TextBox ID="TextBox1" runat="server" Enabled=false Width=150px></asp:TextBox>
                                <asp:LinkButton ID="LinkButton1" runat="server" onclick="lbnModal_Click" >Lookup</asp:LinkButton>
								 
							</div class="field">
                            						                     
							<div class="field">
								<label for="org_postcode">Status </label>
								<input type="text" name="postcode" value="" id="Text9" disabled/>
							 
							</div>
                            <div class="field">
								<label for="org_desshort">P/MW Enquiry Received Date <span style="color:Red">*</span></label>
								<asp:TextBox ID="receiveDate" runat="server"></asp:TextBox>
                                <br />
							    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ErrorMessage="RequiredFieldValidator" ControlToValidate="receiveDate" 
                                    ForeColor="Red" ValidationGroup="vgroup">Not Empty Received Date</asp:RequiredFieldValidator>
							</div>
                            <div class="field">
								<label for="org_desshort">Authorised Date</label>								 
                                <asp:TextBox ID="authorisedDate" runat="server"></asp:TextBox>
                                 
							</div>
                            <div class="field">
								<label for="org_desshort">Anticipated Completion </label>								 
                                <asp:TextBox ID="anticipatedCompletion" runat="server"></asp:TextBox>
                                
							</div>
                            <div class="field">
								<label for="org_desshort">Actual Completion Date </label>								 
                                <asp:TextBox ID="completionDate" runat="server"></asp:TextBox>
                                
							</div>  
                            <div class="field">
								<label for="org_postcode">Is Active? </label>
								<asp:CheckBox ID="IsActive" name="isTBA" runat="server" />							 
							</div>     					     						                                 
						</div>	               
				   </div>
                </div>
                
</div>
</div>
   <!-- Modal -->
    <div id="wrap" runat="server" >
        <div id="modalLookup" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="width:70%;margin-left:-30%"
            aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×</button>
                <h3 id="myModalLabel">
                    List Contact</h3>
            </div>
            <div class="modal-body">
                 
                    <div class="field">
                        <label for="postcode" style="display: inline-block; margin-left: 5px; margin-right: 15px">
                            First Name :
                        </label>
                        <asp:TextBox ID="txtFirstName" CssClass="searchText" runat="server"></asp:TextBox>
                        <label for="street" style="display: inline-block; margin-left: 30px">
                            Surname :
                        </label>
                        <asp:TextBox ID="txtSurName" CssClass="searchText" runat="server"></asp:TextBox>
                    </div>
                 
                </br>
                <div>
                    <!--<input type="button" value="Search Contact" class="btn btn-primary" style="margin-right:10px" />-->
                    <asp:Button ID="btnSearch" runat="server" Text="SearchContact" CssClass="btn btn-primary"
                        OnClick="btnSearch_Click" />
                    <input type="button" value="None" class="btn btn-primary" style="margin-right: 10px" />
                    <input type="button" value="Clear" class="btn btn-primary" style="margin-right: 10px" />
                    <a href="ContactCreate.aspx">
                        <input type="button" class="btn btn-primary" value="Create" /></a>
                </div>
                </br>
                <div>
                    <asp:CheckBox ID="cbxInactive" Text="" CssClass="checkbox inline"
                        runat="server" AutoPostBack="True" OnCheckedChanged="cbxInactive_CheckedChanged" />Include in-active contact?
                </div>
                <div class="div-table">
                    <asp:Repeater ID="rptContact" runat="server">
                        <HeaderTemplate>
                            <table width="100%" class="table-striped table-bordered">
                                <thead>
                                    <tr style="background: #006dcc;color:White">
                                        <th>
                                        </th>
                                        <th>
                                            Contact Name
                                        </th>
                                        <th>
                                            Mobile Phone
                                        </th>
                                        <th>
                                            Email
                                        </th>
                                        <th>
                                            Contact Type
                                        </th>
                                        <th>
                                            Is Active?
                                        </th>
                                        <th>
                                            Note
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <input type="radio" name="select" id="select" value="<%#Eval("ContactId") %>" onselect="testFunction()" />
                                    <input type="hidden" name="id" value="<%#Eval("ContactId") %>" />
                                </td>
                                <td>
                                    <%#Eval("FirstName") %>
                                </td>
                                <td>
                                    <%#Eval("MobilePhone") %>
                                </td>
                                <td>
                                    <%#Eval("Email") %>
                                </td>
                                <td>
                                    <%#Eval("ContactTypeID") %>
                                </td>
                                <td>
                                    <%#Eval("IsActive") %>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </tbody> </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    </br> 
                        <span class="pagelinks" style="float: right;">
                            
                                <asp:HyperLink ID="hplBackward" runat="server"><span class="icon icon-backward"></span></asp:HyperLink>
                            Page
                            <asp:Label ID="lblCurrent" runat="server" Text="Label"></asp:Label>
                            of 
                            <span class="nops">
                                <asp:Label ID="lblTotal" runat="server" Text="Label"></asp:Label>
                            </span> 
                            
                                <asp:HyperLink ID="hplForward" runat="server"><span class="icon icon-forward"></span></asp:HyperLink>
                        </span>
                </div>
                <div class="form-inline">
                    
                    <input type="button" value="Select" class="btn btn-primary" style="margin-top: 40px;
                        margin-right: 10px" onclick="btnSelect_click()" />
                    <asp:LinkButton ID="lbnEdit" runat="server" CssClass="btn btn-primary" OnClientClick="fillId()"
                        OnClick="lbnEdit_Click">Edit</asp:LinkButton>
                    <input type="button" id="btnClose" class="btn btn-primary" value="Close" style="margin-top: 40px;
                        margin-right: 10px" />
                
                </div>
            </div>
 
        </div>
    </div>

</asp:Content>
